<template>
  <div class="next-task">
    <div class="next-task-title">下个任务</div>
    <el-form ref="form" label-width="auto" label-position="left">
      <el-form-item v-for="item in nextTaskList" :label="item.taskName">
        <el-date-picker
          :disabled-date="disabledDate"
          value-format="YYYY-MM-DD"
          v-model="item.plainStartDate"
          type="date"
          placeholder="请选择"
        >
        </el-date-picker>
      </el-form-item>
    </el-form>
  </div>
</template>
<script setup>
import { computed } from "vue";
import { disabledDate } from "@/utils/disabledOldDate";

const props = defineProps(["modelValue"]);
const $emit = defineEmits(["update:modelValue"]);
const nextTaskList = computed({
  get() {
    return props.modelValue;
  },
  set(val) {
    $emit("update:modelValue", val);
  }
});
</script>
<style lang="scss" scoped>
@use "@/assets/styles/mixin";
.next-task {
  .next-task-title {
    font-size: 16px;
    color: #86909c;
    margin-bottom: 10px;
  }
  .task-list {
    .task-item {
      @include mixin.flex-align;
      margin-bottom: 15px;
      &__name {
        font-size: 14px;
        color: #3d3d3d;
        margin-right: 10px;
      }
      &__value {
        flex-grow: 1;
      }
    }
  }
}
:deep(.el-date-editor--date) {
  width: 100%;
}
</style>
